<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/3/20
  Time: 12:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<script type="text/javascript" src="js/jquery.min.js"></script>
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/bootstrap.css">
<body>
<c:if test="${! empty msg }">
    <script type="text/javascript">

        alert("${msg}");

    </script>

    <!-- 使用完记得清除，避免影响其他页面 -->
    <c:remove var="msg" scope="session"/>
</c:if>

<nav class="navbar navbar-default">
    <div>
        <ul class="nav navbar-nav">
            <li>
                <a><b>快递派发</b></a>
            </li>
            <li>
                <a>${phone }</a>
            </li>
            <li>
                <a href="index.jsp">
                    首页
                </a>
            </li>

            <li>
                <a id="time1"></a>
            </li>

        </ul>
    </div>
</nav>
<table align="center" cellspacing="1px" cellpadding="1px">

    <form action="updateBalance2.do" method="post">
        <tr>
            <td>手机号:</td>
            <td><input type="text" name="phone"></td>
        </tr>
        <tr>
            <td>余额:</td>
            <td><input type="text" name="balance"></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center"><input type="submit" value="充值"></td>
        </tr>
    </form>
</table>

</body>
</html>

<script>
    function showTime() {
        var now = new Date();
        return now.toLocaleString();
    }

    setInterval(function () {
        var d = showTime();
        $("#time1").html(d);
    }, 1000);
</script>